﻿using System.Runtime.Serialization;

#pragma warning disable 0649

namespace BattleNet
{
    /// <summary>
    /// 
    /// </summary>
    [DataContract]
    public abstract class BattleNetObject
    {
        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "code")]
        private string _code;
        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "status")]
        private string _status;
        /// <summary>
        ///
        /// </summary>
        protected string Code
        {
            get
            {
                if (string.IsNullOrEmpty(this._code))
                {
                    return this._code;
                }
                else if (string.IsNullOrEmpty(this._status))
                {
                    return this._status;
                }
                else
                {
                    return string.Empty;
                }
            }            
        }

        /// <summary>
        /// 
        /// </summary>
        [DataMember(Name = "reason")]
        private string _reason;
        /// <summary>
        ///
        /// </summary>
        protected string Reason
        {
            get { return this._reason; }
        }

        /// <summary>
        /// 
        /// </summary>
        public BattleNetObject()
        {
        }
    }
}
